package com.foreknow.oppTest1;

/**
 * @author shkstart
 * @create 2021-07-23 15:42
 */
public class Computer {
    String[] figure;
    String[] s;

    public Computer() {
        figure = new String[3];
        figure[0] = "刘备";
        figure[1] = "孙权";
        figure[2] = "曹操";
        s = new String[3];
        s[0] = "剪刀";
        s[1] = "石头";
        s[2] = "布";
    }

    public int showFirst() {
        int com = (int) (Math.random() * (3 - 0) +1 );
        System.out.println("电脑出拳" + new Computer().s[com - 1]);
        return com;
    }


}
